Skip to content

Commit

Permalink
prettier-fix
Browse files Browse the repository at this point in the history
Signed-off-by: hanbollar <github@hannahbollar.com>
  • Loading branch information
hanbollar committed May 18, 2024
1 parent ba21b74 commit 0a8b728
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 29 deletions.
24 changes: 6 additions & 18 deletions src/core/MRApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { XRButton } from 'three/addons/webxr/XRButton.js';
import Stats from 'stats.js';

import {
mrjsUtils
} from 'mrjs';
import { mrjsUtils } from 'mrjs';

import {
MRElement,
MREntity,
MRSystem
} from 'mrjs/core';
import { MRElement, MREntity, MRSystem } from 'mrjs/core';

import { MRUser } from 'mrjs/core/user';

import { MRSkyBoxEntity, MRStatsEntity } from 'mrjs/core/entities';
import {
MRUser
} from 'mrjs/core/user';

import {
MRSkyBoxEntity,
MRStatsEntity
} from 'mrjs/core/entities';
import {
AnchorSystem,
AnimationSystem,
AudioSystem,
Expand All @@ -36,10 +25,9 @@ import {
PhysicsSystem,
SkyBoxSystem,
StatsSystem,
TextSystem
TextSystem,
} from 'mrjs/core/componentSystems';


('use strict');
window.mobileCheck = function () {
return mrjsUtils.display.mobileCheckFunction();
Expand Down
2 changes: 1 addition & 1 deletion src/core/componentSystems/ControlSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class ControlSystem extends MRSystem {
cursorMaterial.color.set(0x000000);
cursorMaterial.opacity = 0.7;
cursorMaterial.transparent = true;
cursorMaterial.name = "cursorMaterial";
cursorMaterial.name = 'cursorMaterial';
this.cursorViz = new THREE.Mesh(new THREE.RingGeometry(0.005, 0.007, 32), cursorMaterial);

this.app.scene.add(this.cursorViz);
Expand Down
2 changes: 1 addition & 1 deletion src/core/componentSystems/MaskingSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class MaskingSystem extends MRSystem {
// therefore, we can use a simpler material than MeshBasicMaterial. Should we use
// ShaderMaterial?
const material = mrjsUtils.material.MeshBasicMaterial.clone();
material.programName = "maskingMaterial";
material.programName = 'maskingMaterial';
const mesh = new THREE.Mesh(sourceObj.geometry, material);
setupMaskingMaterial(mesh.material, stencilRefShift, this.app.debug);

Expand Down
2 changes: 1 addition & 1 deletion src/core/entities/MRMediaEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class MRMediaEntity extends MRDivEntity {
const mediaGeometry = new THREE.PlaneGeometry(mediaWidth, mediaHeight);
const mediaMaterial = mrjsUtils.material.MeshStandardMaterial.clone();
mediaMaterial.map = this.texture;
mediaMaterial.name = "mediaMaterial";
mediaMaterial.name = 'mediaMaterial';
_oldSubMediaMeshNotNeeded();
this.subMediaMesh.geometry = mediaGeometry;
this.subMediaMesh.material = mediaMaterial;
Expand Down
4 changes: 2 additions & 2 deletions src/core/entities/MRSkyBoxEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class MRSkyBoxEntity extends MREntity {
const material = mrjsUtils.material.MeshStandardMaterial.clone();
material.envMap = texture;
material.side = THREE.BackSide;
material.programName = "skyboxMaterial-1";
material.programName = 'skyboxMaterial-1';
this.skybox.material = material;
} else {
// Handle single texture case
Expand All @@ -48,7 +48,7 @@ export class MRSkyBoxEntity extends MREntity {
material.envMap = texture;
material.side = THREE.BackSide;
material.opacity = 1;
material.programName = "skyboxMaterial-2";
material.programName = 'skyboxMaterial-2';
this.skybox.material = material;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/entities/MRTextInputEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class MRTextInputEntity extends MRTextEntity {
const material = mrjsUtils.material.MeshBasicMaterial.clone();
material.color.set(0x000000);
material.side = THREE.DoubleSide;
material.programName = "text:cursorMaterial";
material.programName = 'text:cursorMaterial';
this.cursor.material = material;
}
if (this.cursor.geometry !== undefined) {
Expand Down
6 changes: 3 additions & 3 deletions src/core/user/MRUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export default class MRUser {
* @returns {object} spotlight - the spotlight to be used.
*/
initSpotlight() {
const material = mrjsUtils.material.MeshBasicMaterial.clone();
const material = mrjsUtils.material.MeshBasicMaterial.clone();
material.colorWrite = false;
material.programName = "spotlightMaterial"
material.programName = 'spotlightMaterial';
this.spotlight = new THREE.Mesh(new THREE.CircleGeometry(1.3, 64), material);

this.spotlight.renderOrder = 2;
this.spotlight.rotation.x = -Math.PI / 2;

Expand Down
2 changes: 1 addition & 1 deletion src/dataManagers/MRPlaneManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class MRPlaneManager {
const material = mrjsUtils.material.MeshBasicMaterial.clone();
material.color.set(0xffffff);
material.colorWrite = false;
material.programName = "planeMeshMaterial";
material.programName = 'planeMeshMaterial';

mrPlane.mesh = new THREE.Mesh(geometry, material);
mrPlane.mesh.position.setFromMatrixPosition(this.matrix);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let material = {};
/**
* Defining materials here to only need to create them once
* since render calls are proportional to the number of gl Materials.
*
*
* An issue creating a large number of render calls per frame
* is that we have multiple normal THREEjs materials that we're reusing
* in places. Since these all just modify the base threejs with uniforms
Expand Down

0 comments on commit 0a8b728

Please sign in to comment.