How to use the @microsoft/mixed-reality-extension-sdk.TextJustify function in @microsoft/mixed-reality-extension-sdk

To help you get started, we’ve selected a few @microsoft/mixed-reality-extension-sdk 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 microsoft / mixed-reality-extension-sdk / packages / functional-tests / src / app.ts View on Github external
private setupRunner() {
		// Main label at the top of the stage
		this.contextLabel = MRE.Actor.Create(this.context, {
			actor: {
				name: 'contextLabel',
				text: {
					contents: this.activeTestName,
					height: 0.2,
					anchor: MRE.TextAnchorLocation.MiddleCenter,
					justify: MRE.TextJustify.Center,
					color: NeutralColor
				},
				transform: {
					local: {
						position: { y: 1.8 }
					}
				}
			}
		});

		this.testRoot = MRE.Actor.Create(this.context, {
			actor: {
				name: 'testRoot',
				exclusiveToUser: this.exclusiveUser && this.exclusiveUser.id || undefined
			}
		});
github microsoft / mixed-reality-extension-sdk / packages / functional-tests / src / app.ts View on Github external
}
		});

		this.playPauseText = MRE.Actor.Create(this.context, {
			actor: {
				parentId: this.playPauseButton.id,
				transform: {
					local: {
						position: { z: -0.1 }
					}
				},
				text: {
					contents: "Start",
					height: 0.15,
					anchor: MRE.TextAnchorLocation.MiddleCenter,
					justify: MRE.TextJustify.Center,
					color: NeutralColor
				}
			}
		});

		this.playPauseButton.setBehavior(MRE.ButtonBehavior)
			.onButton("released", user => {
				if (this.activeTest === null) {
					this.runTest(user);
				} else {
					this.stopTest().catch(() => { });
				}
			});

		const menuButton = MRE.Actor.Create(this.context, {
			actor: {
github microsoft / mixed-reality-extension-sdk-samples / samples / solar-system / src / app.ts View on Github external
name: `${bodyName}-body`,
                    parentId: obliquity1.value.id,
                    transform: {
                        local: { scale: scaleValue }
                    }
                }

            });

            label.value.enableText({
                contents: bodyName,
                height: 0.5,
                pixelsPerLine: 50,
                color: MRESDK.Color3.Yellow(),
                anchor: MRESDK.TextAnchorLocation.TopCenter,
                justify: MRESDK.TextJustify.Center,
            });

            setTimeout(() => {
                label.value.text.color = MRESDK.Color3.White();
            }, 5000);

            this.celestialBodies[bodyName] = {
                inclination: inclination.value,
                position: position.value,
                obliquity0: obliquity0.value,
                obliquity1: obliquity1.value,
                model: model.value
            } as CelestialBody;

            this.createAnimations(bodyName);
        } catch (e) {
github microsoft / mixed-reality-extension-sdk-samples / samples / solar-system / src / app.ts View on Github external
actor: {
                    name: `${bodyName}-body`,
                    parentId: obliquity1.value.id,
                    transform: {
                        scale: scaleValue
                    }
                }
            });

            label.value.enableText({
                contents: bodyName,
                height: 0.5,
                pixelsPerLine: 50,
                color: MRESDK.Color3.Yellow(),
                anchor: MRESDK.TextAnchorLocation.TopCenter,
                justify: MRESDK.TextJustify.Center,
            });

            setTimeout(() => {
                label.value.text.color = MRESDK.Color3.White();
            }, 5000);

            this.celestialBodies[bodyName] = {
                inclination: inclination.value,
                position: position.value,
                obliquity0: obliquity0.value,
                obliquity1: obliquity1.value,
                model: model.value
            } as CelestialBody;

            this.createAnimations(bodyName);
        } catch (e) {

@microsoft/mixed-reality-extension-sdk

The Mixed Reality Extension SDK enables developers to build 3D world extensions for AltspaceVR, using Node.JS.

MIT
Latest version published 4 years ago

Package Health Score

48 / 100
Full package analysis