Revert "refactor: define _IS_CHROMATIC_"
This reverts commit a35f0d43e4
.
This commit is contained in:
parent
a35f0d43e4
commit
ed3c137543
|
@ -82,7 +82,6 @@ module.exports = {
|
|||
'_LANGS_': false,
|
||||
'_VERSION_': false,
|
||||
'_ENV_': false,
|
||||
'_IS_CHROMATIC_': false,
|
||||
'_PERF_PREFIX_': false,
|
||||
'_DATA_TRANSFER_DRIVE_FILE_': false,
|
||||
'_DATA_TRANSFER_DRIVE_FOLDER_': false,
|
||||
|
|
|
@ -32,9 +32,6 @@ const config = {
|
|||
rootDir: config.root ?? process.cwd(),
|
||||
}),
|
||||
],
|
||||
define: {
|
||||
_IS_CHROMATIC_: true,
|
||||
},
|
||||
build: {
|
||||
target: [
|
||||
'chrome108',
|
||||
|
|
1
packages/frontend/@types/global.d.ts
vendored
1
packages/frontend/@types/global.d.ts
vendored
|
@ -4,7 +4,6 @@ declare const _LANGS_: string[][];
|
|||
declare const _VERSION_: string;
|
||||
declare const _ENV_: string;
|
||||
declare const _DEV_: boolean;
|
||||
declare const _IS_CHROMATIC_: boolean;
|
||||
declare const _PERF_PREFIX_: string;
|
||||
declare const _DATA_TRANSFER_DRIVE_FILE_: string;
|
||||
declare const _DATA_TRANSFER_DRIVE_FOLDER_: string;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, shallowRef } from 'vue';
|
||||
import isChromatic from 'chromatic/isChromatic';
|
||||
|
||||
const canvasEl = shallowRef<HTMLCanvasElement>();
|
||||
|
||||
|
@ -203,7 +204,7 @@ onMounted(() => {
|
|||
const vertices = [1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0];
|
||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.DYNAMIC_DRAW);
|
||||
|
||||
if (_IS_CHROMATIC_) {
|
||||
if (isChromatic()) {
|
||||
gl!.uniform1f(u_time, 0);
|
||||
gl!.drawArrays(gl!.TRIANGLE_STRIP, 0, 4);
|
||||
} else {
|
||||
|
|
|
@ -95,7 +95,6 @@ export function getConfig(): UserConfig {
|
|||
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
|
||||
_ENV_: JSON.stringify(process.env.NODE_ENV),
|
||||
_DEV_: process.env.NODE_ENV !== 'production',
|
||||
_IS_CHROMATIC_: false,
|
||||
_PERF_PREFIX_: JSON.stringify('Misskey:'),
|
||||
_DATA_TRANSFER_DRIVE_FILE_: JSON.stringify('mk_drive_file'),
|
||||
_DATA_TRANSFER_DRIVE_FOLDER_: JSON.stringify('mk_drive_folder'),
|
||||
|
|
Loading…
Reference in a new issue