How to use the @babylonjs/core/Maths/math.Color3 function in @babylonjs/core

To help you get started, we’ve selected a few @babylonjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andyhall / noa / src / lib / rendering.js View on Github external
function getHighlightMesh(rendering) {
    var m = rendering._highlightMesh
    if (!m) {
        var mesh = Mesh.CreatePlane("highlight", 1.0, rendering._scene)
        var hlm = rendering.makeStandardMaterial('highlightMat')
        hlm.backFaceCulling = false
        hlm.emissiveColor = new Color3(1, 1, 1)
        hlm.alpha = 0.2
        mesh.material = hlm
        m = rendering._highlightMesh = mesh
        // outline
        var s = 0.5
        var lines = Mesh.CreateLines("hightlightLines", [
            new Vector3(s, s, 0),
            new Vector3(s, -s, 0),
            new Vector3(-s, -s, 0),
            new Vector3(-s, s, 0),
            new Vector3(s, s, 0)
        ], rendering._scene)
        lines.color = new Color3(1, 1, 1)
        lines.parent = mesh

        rendering.addMeshToScene(m)
github virtual-cast / babylon-vrm-loader / src / vrm-material-generator.ts View on Github external
applyPropertyWhenDefined(prop.vectorProperties._EmissionColor, (value) => {
            material.emissiveColor = new Color3(value[0], value[1], value[2]);
        });
        applyPropertyWhenDefined(prop.floatProperties._OutlineWidth, (value) => material.outlineWidth = value);
github virtual-cast / babylon-vrm-loader / src / vrm-material-generator.ts View on Github external
applyPropertyWhenDefined(prop.vectorProperties._OutlineColor, (value) => {
            material.outlineColor = new Color3(value[0], value[1], value[2]);
        });
        applyPropertyWhenDefined(prop.floatProperties._OutlineLightingMix, (value) => material.outlineLightingMix = value);
github andyhall / noa / src / lib / rendering.js View on Github external
    function arrToColor(a) { return new Color3(a[0], a[1], a[2]) }
    scene.clearColor = arrToColor(opts.clearColor)
github virtual-cast / babylon-vrm-loader / src / vrm-material-generator.ts View on Github external
applyPropertyWhenDefined(prop.vectorProperties._ShadeColor, (value) => {
            material.shadeColor = new Color3(value[0], value[1], value[2]);
        });
        applyPropertyWhenDefined(prop.floatProperties._BumpScale, (value) => material.bumpScale = value);
github virtual-cast / babylon-vrm-loader / src / vrm-material-generator.ts View on Github external
applyPropertyWhenDefined(prop.vectorProperties._RimColor, (value) => {
            material.rimColor = new Color3(value[0], value[1], value[2]);
        });
        applyPropertyWhenDefined(prop.floatProperties._RimLightingMix, (value) => material.rimLightingMix = value);