Stay organized with collections
Save and categorize content based on your preferences.
blockly > blockRendering > Renderer > makeConstants_
blockRendering.Renderer.makeConstants_() method
Create a new instance of the renderer's constant provider.
Signature:
protected makeConstants_(): ConstantProvider;
Returns:
ConstantProvider
The constant provider.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003emakeConstants_\u003c/code\u003e method creates a new ConstantProvider object for the renderer.\u003c/p\u003e\n"],["\u003cp\u003eThis method is protected and returns a ConstantProvider instance which holds rendering constants.\u003c/p\u003e\n"],["\u003cp\u003eThe ConstantProvider is used to ensure consistent visual styling for blocks within the Blockly workspace.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [Renderer](./blockly.blockrendering_namespace.renderer_class.md) \\\u003e [makeConstants_](./blockly.blockrendering_namespace.renderer_class.makeconstants__1_method.md)\n\nblockRendering.Renderer.makeConstants_() method\n-----------------------------------------------\n\nCreate a new instance of the renderer's constant provider.\n\n**Signature:** \n\n protected makeConstants_(): ConstantProvider;\n\n**Returns:**\n\n[ConstantProvider](./blockly.blockrendering_namespace.constantprovider_class.md)\n\nThe constant provider."]]