This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const viewerElement = document.getElementById('test') as HTMLElement | |
const tooltipInLeftHalfOfViewer = hoverState.tooltipPosition.screenX < viewerElement.clientWidth / 2 | |
const tooltipInTopThirdOfViewer = hoverState.tooltipPosition.screenY < viewerElement.clientHeight / 3 | |
const tooltipInBottomThirdOfViewer = hoverState.tooltipPosition.screenY > (2 * viewerElement.clientHeight) / 3 | |
tooltipElement?.style.setProperty('display', 'block') | |
tooltipElement?.style.setProperty('top', `${hoverState.tooltipPosition.screenY}px`) | |
let tX: string, tY: string | |
if (tooltipInLeftHalfOfViewer) { | |
tooltipElement?.style.setProperty('left', `${hoverState.tooltipPosition.screenX}px`) | |
tooltipElement?.style.setProperty('right', 'unset') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Behavior } from "../../Behaviors/behavior"; | |
import { Mesh } from "../../Meshes/mesh"; | |
import { AbstractMesh } from "../../Meshes/abstractMesh"; | |
import { Scene } from "../../scene"; | |
import { Nullable } from "../../types"; | |
import { Observer, Observable } from "../../Misc/observable"; | |
import { Vector3 } from "../../Maths/math.vector"; | |
import { PointerInfo, PointerEventTypes } from "../../Events/pointerEvents"; | |
import { Ray } from "../../Culling/ray"; | |
import { PivotTools } from '../../Misc/pivotTools'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... build and push to gcloud ... # | |
# install sentry cli | |
echo "Installing and configuring sentry cli" | |
curl -L -o sentry-cli https://github.com/getsentry/sentry-cli/releases/download/1.40.0/sentry-cli-Linux-x86_64 | |
chmod u+x sentry-cli | |
./sentry-cli --version | |
export SENTRY_ORG=<sentry-org> | |
export SENTRY_PROJECT=<sentry-project> | |
# create sentry release and upload source maps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# build | |
yarn react-app-rewired build | |
# install gcloud cli | |
echo "Installing gcloud sdk" | |
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-237.0.0-linux-x86_64.tar.gz | |
tar -xzf google-cloud-sdk-237.0.0-linux-x86_64.tar.gz | |
./google-cloud-sdk/bin/gcloud --version | |
# authenticate to gcloud | |
echo "Authenticating to gcloud" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack') | |
function setSourceMaps (config, env) { | |
config.devtool = false | |
if (!config.plugins) { | |
config.plugins = [] | |
} | |
config.plugins.push( | |
new webpack.SourceMapDevToolPlugin({ | |
append: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const R = require('ramda') | |
const interfaces = {...} | |
const unpackSelectionFromAST = R.map(s => { | |
switch (s.kind) { | |
case 'Field': | |
if (!s.selectionSet) { | |
return s.name.value | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { makeSelection, formatPrimitiveFields } = require('./interfaces') | |
const Query = { | |
characters (parent, args, ctx, info) { | |
return ctx.db.query | |
.dbCharacters( | |
args, | |
makeSelection(info) | |
) | |
.then(formatPrimitiveFields) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const interfaces = { | |
Character: { | |
__resolveType (obj) { | |
// resolve the type of the incoming interface data | |
if (obj.primaryFunction) { | |
return 'Droid' | |
} else { | |
return 'Human' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { interfaces } = require('./interfaces') | |
const { Query } = require('./Query') | |
module.exports = { | |
...interfaces, | |
Query | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import {} from "./generated/prisma.graphql" | |
type Query { | |
characters( | |
where: DbCharacterWhereInput | |
orderBy: DbCharacterOrderByInput | |
skip: Int | |
after: String | |
before: String | |
first: Int |
NewerOlder